<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>欢迎页面</title>
    <style>
        body {
            text-align: center;
            margin-top: 50px;
            font-family: Arial, sans-serif;
        }
    </style>
    <script>
        function getParameterByName(name, url) {
            if (!url) url = window.location.search.substring(1);
            const urlParams = new URLSearchParams(url);
            return urlParams.get(name);
        }

        window.onload = function() {
            const username = getParameterByName('username');
            const password = getParameterByName('password');

            console.log('Username:', username);
            console.log('Password:', password);

            if (username && password) {
                document.getElementById('usernameValue').textContent = username;
                document.getElementById('passwordValue').textContent = password;
            } else {
                document.getElementById('message').textContent = '未接收到参数，请重新登录。';
            }
        };
    </script>
</head>
<body>
    <h1>欢迎页面</h1>
    <p>您输入的用户名是：<span id="usernameValue"></span></p>
    <p>您输入的密码是：<span id="passwordValue"></span></p>
    <p id="message"></p>
</body>
</html>